<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的第一个网页,静态资源引入方式一</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='bootstrap/css/bootstrap.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='easyui/themes/icon.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='easyui/themes/bootstrap/easyui.css') }}">

    <script src="{{ url_for('static',filename='easyui/jquery.min.js') }}"></script>
    <script src="{{ url_for('static',filename='easyui/jquery.easyui.min.js') }}"></script>
    <script src="{{ url_for('static',filename='easyui/locale/easyui-lang-zh_CN.js') }}"></script>
</head>
<body>
<button id="btn1" class="btn btn-danger">ajax get提交</button>
<br>
<button id="btn2" class="btn btn-danger">ajax post提交</button>

<button id="btn3" class="btn btn-danger">打开窗口</button>
<div id="dlg1"></div>
<script>

    $(function(){
        //$.messager.alert('系统提示','index.html 资源加载成功...','info')

        $('#btn1').on('click',function(e){
            $.get('/dologin?username=yzl_get&password=123456',function(data){
                console.log(data)
            })
        })

        $('#btn2').on('click',function(e){
            $.post('/dologin',{username:'yzl',password:'123456'},function(data){
                console.log(data)
            })
        })

        $('#btn3').on('click',function(e){
            $('#dlg1').dialog({
                    title: '书籍详情',
                    width: 400,
                    height: 400,
                    closed: false,
                    cache: false,
                    href: "{{ url_for('dlg1') }}",
                    modal: true
                })
        })
    })
</script>
</body>
</html>